﻿//默认配置
var theme = {
    // 默认色板
    color: ['#71a6ef', '#68d4b1', '#54becc', '#a4e59b', '#e6f3a4'],

    // 图表标题
    title: {
        textStyle: {
            fontWeight: 'normal',
            color: '#1790cf'
        }
    },

    // 值域
    dataRange: {
        color: ['#1178ad', '#72bbd0']
    },

    // 工具箱
    toolbox: {
        color: ['#1790cf', '#1790cf', '#1790cf', '#1790cf']
    },

    // 提示框
    tooltip: {
        backgroundColor: 'rgba(0,0,0,0.5)',
        axisPointer: { // 坐标轴指示器，坐标轴触发有效
            type: 'line', // 默认为直线，可选为：'line' | 'shadow'
            lineStyle: { // 直线指示器样式设置
                color: '#1790cf',
                type: 'dashed'
            },
            crossStyle: {
                color: '#1790cf'
            },
            shadowStyle: { // 阴影指示器样式设置
                color: 'rgba(200,200,200,0.3)'
            }
        }
    },

    // 区域缩放控制器
    dataZoom: {
        dataBackgroundColor: '#eee', // 数据背景颜色
        fillerColor: 'rgba(144,197,237,0.2)', // 填充颜色
        handleColor: '#1790cf' // 手柄颜色
    },

    // 网格
    grid: {
        borderWidth: 0
    },

    // 类目轴
    categoryAxis: {
        axisLine: { // 坐标轴线
            lineStyle: { // 属性lineStyle控制线条样式
                color: '#1790cf'
            }
        },
        splitLine: { // 分隔线
            lineStyle: { // 属性lineStyle（详见lineStyle）控制线条样式
                color: ['#eee']
            }
        }
    },

    // 数值型坐标轴默认参数
    valueAxis: {
        axisLine: { // 坐标轴线
            lineStyle: { // 属性lineStyle控制线条样式
                color: '#1790cf'
            }
        },
        splitArea: {
            show: true,
            areaStyle: {
                color: ['rgba(250,250,250,0.1)', 'rgba(200,200,200,0.1)']
            }
        },
        splitLine: { // 分隔线
            lineStyle: { // 属性lineStyle（详见lineStyle）控制线条样式
                color: ['#eee']
            }
        }
    },

    timeline: {
        lineStyle: {
            color: '#1790cf'
        },
        controlStyle: {
            normal: { color: '#1790cf' },
            emphasis: { color: '#1790cf' }
        }
    },

    // K线图默认参数
    k: {
        itemStyle: {
            normal: {
                color: '#1bb2d8', // 阳线填充颜色
                color0: '#99d2dd', // 阴线填充颜色
                lineStyle: {
                    width: 1,
                    color: '#1c7099', // 阳线边框颜色
                    color0: '#88b0bb' // 阴线边框颜色
                }
            }
        }
    },

    map: {
        itemStyle: {
            normal: {
                areaStyle: {
                    color: '#ddd'
                },
                label: {
                    textStyle: {
                        color: '#c12e34'
                    }
                }
            },
            emphasis: { // 也是选中样式
                areaStyle: {
                    color: '#99d2dd'
                },
                label: {
                    textStyle: {
                        color: '#c12e34'
                    }
                }
            }
        }
    },

    force: {
        itemStyle: {
            normal: {
                linkStyle: {
                    color: '#1790cf'
                }
            }
        }
    },

    chord: {
        padding: 4,
        itemStyle: {
            normal: {
                borderWidth: 1,
                borderColor: 'rgba(128, 128, 128, 0.5)',
                chordStyle: {
                    lineStyle: {
                        color: 'rgba(128, 128, 128, 0.5)'
                    }
                }
            },
            emphasis: {
                borderWidth: 1,
                borderColor: 'rgba(128, 128, 128, 0.5)',
                chordStyle: {
                    lineStyle: {
                        color: 'rgba(128, 128, 128, 0.5)'
                    }
                }
            }
        }
    },

    gauge: {
        axisLine: { // 坐标轴线
            show: true, // 默认显示，属性show控制显示与否
            lineStyle: { // 属性lineStyle控制线条样式
                color: [
                    [0.2, '#1bb2d8'],
                    [0.8, '#1790cf'],
                    [1, '#1c7099']
                ],
                width: 8
            }
        },
        axisTick: { // 坐标轴小标记
            splitNumber: 10, // 每份split细分多少段
            length: 12, // 属性length控制线长
            lineStyle: { // 属性lineStyle控制线条样式
                color: 'auto'
            }
        },
        axisLabel: { // 坐标轴文本标签，详见axis.axisLabel
            textStyle: { // 其余属性默认使用全局文本样式，详见TEXTSTYLE
                color: 'auto'
            }
        },
        splitLine: { // 分隔线
            length: 18, // 属性length控制线长
            lineStyle: { // 属性lineStyle（详见lineStyle）控制线条样式
                color: 'auto'
            }
        },
        pointer: {
            length: '90%',
            color: 'auto'
        },
        title: {
            textStyle: { // 其余属性默认使用全局文本样式，详见TEXTSTYLE
                color: '#333'
            }
        },
        detail: {
            textStyle: { // 其余属性默认使用全局文本样式，详见TEXTSTYLE
                color: 'auto'
            }
        }
    },

    textStyle: {
        fontFamily: '微软雅黑, Arial, Verdana, sans-serif'
    }
};

//仪表盘
$(function() {
    (function(echarts) {
        if (document.getElementById("demochart1")) {
            var option = {
                toolbox: {
                    show: false
                },
                series: [{
                    name: "文理选课情况",
                    type: "gauge",
                    detail: {
                        formatter: "{value}%",
                        offsetCenter: [0, 24],
                        backgroundColor: "rgba(0,0,0,0)",
                        textStyle: {
                            fontSize: 12,
                            fontStyle: "normal",
                            color: "#7c7c7c"
                        },
                        show: true
                    },
                    data: [{
                        value: 40,
                        name: "平均得分"
                    }],
                    min: 0,
                    max: 100,
                    splitNumber: 10,
                    axisLine: {
                        lineStyle: {
                            color: [
                                [0.2, "rgb(113, 166, 239)"],
                                [0.8, "rgb(113, 166, 239)"],
                                [1, "rgb(113, 166, 239)"]
                            ],
                            width: 3
                        },
                        show: true
                    },
                    axisLabel: { // 坐标轴小标记  
                        textStyle: { // 属性lineStyle控制线条样式  
                            fontWeight: 'bolder',
                            fontSize: 12,
                            color: '#7c7c7c'
                        }
                    },
                    startAngle: 180,
                    endAngle: 0,
                    title: {
                        show: true,
                        offsetCenter: [0, 26],
                        textStyle: {
                            fontSize: 12,
                            fontStyle: "normal",
                            color: "#7c7c7c"
                        }
                    },
                    axisTick: {
                        show: false
                    },
                    splitLine: { // 分隔线  
                        length: 10, // 属性length控制线长  
                        lineStyle: { // 属性lineStyle（详见lineStyle）控制线条样式  
                            width: 1,
                            color: '#71a6ef'
                        }
                    },
                    center: ["50%", "70%"],
                    radius: "100%",
                    pointer: {
                        width: 6,
                        color: '#a2d8b4',
                        length: '90%'
                    }
                }],
                tooltip: {
                    formatter: "{a} <br>{b} : {c}%"
                }
            };

            var dom = document.getElementById("demochart1");
            var myChart = echarts.init(dom);
            myChart.setOption(option, theme);
            $(window).resize(myChart.resize);
        }
    })(echarts);
});


//地图
$(function() {
    (function(echarts) {
        if (document.getElementById("demochart2")) {
            var option = {
                title: {
                    x: "center"
                },
                tooltip: {
                    trigger: "item"
                },
                dataRange: {
                    min: 0,
                    max: 2500,
                    x: "left",
                    y: "bottom",
                    calculable: false,
                    color: ["rgb(56, 136, 225)", "rgb(234, 243, 252)"],
                    text: ["高", "低"],
                    itemWidth: 10,
                    orient: "vertical",
                    itemGap: 0,
                    textStyle: {
                        color: "rgb(124, 124, 124)",
                        fontSize: 12
                    }
                },
                toolbox: {
                    show: false,
                    orient: "vertical",
                    x: "right",
                    y: "bottom",
                    feature: {
                        mark: {
                            show: true
                        },
                        dataView: {
                            show: true,
                            readOnly: false
                        },
                        restore: {
                            show: true
                        },
                        saveAsImage: {
                            show: true
                        }
                    }
                },
                roamController: {
                    show: false,
                    mapTypeControl: {
                        china: true
                    }
                },
                series: [{
                    name: "教学提案备案率",
                    type: "map",
                    mapType: "china",
                    roam: true,
                    mapValueCalculation: "sum",
                    itemStyle: {
                        normal: {
                            label: {
                                show: false
                            }
                        },
                        emphasis: {
                            color: '#e6f3a4',
                            label: {
                                show: true,
                                textStyle: {
                                    color: "rgb(124, 124, 124)",
                                    fontSize: 12
                                }
                            }
                        }
                    },
                    data: [{
                        value: 234,
                        name: "北京"
                    }, {
                        value: 532,
                        name: "天津"
                    }, {
                        value: 134,
                        name: "上海"
                    }, {
                        value: 983,
                        name: "重庆"
                    }, {
                        value: 783,
                        name: "河北"
                    }, {
                        value: 345,
                        name: "河南"
                    }, {
                        value: 872,
                        name: "云南"
                    }, {
                        value: 94,
                        name: "辽宁"
                    }, {
                        value: 342,
                        name: "黑龙江"
                    }, {
                        value: 989,
                        name: "湖南"
                    }, {
                        value: 767,
                        name: "安徽"
                    }, {
                        value: 675,
                        name: "山东"
                    }, {
                        value: 874,
                        name: "新疆"
                    }, {
                        value: 874,
                        name: "江苏"
                    }, {
                        value: 878,
                        name: "浙江"
                    }, {
                        value: 928,
                        name: "江西"
                    }, {
                        value: 44,
                        name: "湖北"
                    }, {
                        value: 448,
                        name: "广西"
                    }, {
                        value: 887,
                        name: "甘肃"
                    }, {
                        value: 903,
                        name: "山西"
                    }, {
                        value: 673,
                        name: "内蒙古"
                    }, {
                        value: 563,
                        name: "陕西"
                    }, {
                        value: 747,
                        name: "吉林"
                    }, {
                        value: 112,
                        name: "福建"
                    }, {
                        value: 473,
                        name: "贵州"
                    }, {
                        value: 647,
                        name: "广东"
                    }, {
                        value: 838,
                        name: "青海"
                    }, {
                        value: 626,
                        name: "西藏"
                    }, {
                        value: 515,
                        name: "四川"
                    }, {
                        value: 172,
                        name: "宁夏"
                    }, {
                        value: 77,
                        name: "海南"
                    }, {
                        value: 837,
                        name: "台湾"
                    }, {
                        value: 677,
                        name: "香港"
                    }, {
                        value: 43,
                        name: "澳门"
                    }]
                }],
                color: ["rgb(56, 136, 225)", "rgb(94, 158, 230)", "rgb(147, 189, 239)", "rgb(199, 221, 246)", "rgb(234, 243, 252)"]
            };

            var dom = document.getElementById("demochart2");
            var myChart = echarts.init(dom);
            myChart.setOption(option, theme);
            $(window).resize(myChart.resize);
        }
    })(echarts);
});

//漏斗图
$(function() {
    (function(echarts) {
        if (document.getElementById("demochart3")) {
            var option = {
                title: {
                    x: "center"
                },
                tooltip: {
                    trigger: "item"
                },
                legend: {
                    orient: "horizontal",
                    x: "center",
                    y: "bottom",
                    data: ["语文", "数学", "英语", "历史", "体育"],
                    itemWidth: 6,
                    itemHeight: 6,
                    itemGap: 20,
                    textStyle: {
                        color: "rgb(124, 124, 124)",
                        fontSize: 12
                    },
                    borderColor: "#ccc"
                },
                toolbox: {
                    show: false
                },
                calculable: false,
                series: [{
                    name: "文理选课情况",
                    type: "funnel",
                    max: 50,
                    itemStyle: {
                        normal: {
                            labelLine: {
                                show: false
                            }
                        },
                        emphasis: {
                            labelLine: {
                                show: false
                            }
                        }
                    },
                    data: [{
                        value: 50,
                        name: "语文"
                    }, {
                        value: 40,
                        name: "数学"
                    }, {
                        value: 30,
                        name: "英语"
                    }, {
                        value: 20,
                        name: "历史"
                    }, {
                        value: 10,
                        name: "体育"
                    }],
                    sort: "descending",
                    y: 10,
                    x: 40,
                    x2: 40,
                    y2: 45
                }],
                color: ["rgb(113, 166, 239)", "rgb(84, 190, 204)", "rgb(104, 212, 177)", "rgb(164, 229, 155)", "rgb(230, 243, 164)"]
            };

            var dom = document.getElementById("demochart3");
            var myChart = echarts.init(dom);
            myChart.setOption(option, theme);
            $(window).resize(myChart.resize);
        }
    })(echarts);
});

//折线图
$(function() {
    (function(echarts) {
        if (document.getElementById("demochart4")) {
            var option = {
                grid: {
                    x: 30,
                    y: 10,
                    x2: 25,
                    y2: 60,
                },
                tooltip: {
                    trigger: "axis"
                },
                legend: {
                    data: ["语文", "数学"],
                    x: "center",
                    y: "bottom",
                    textStyle: {
                        color: "rgb(124, 124, 124)",
                        fontSize: 12
                    }
                },
                toolbox: {
                    show: false
                },
                calculable: false,
                xAxis: [{
                    type: "category",
                    boundaryGap: false,
                    data: ["2016/06", "2016/07", "2016/08", "2016/09", "2016/10", "2016/11", "2016/12"],
                    axisLine: {
                        show: false
                    },
                    axisTick: {
                        show: false
                    },
                    axisLabel: {
                        show: true,
                        textStyle: {
                            color: "rgb(124, 124, 124)",
                            fontSize: 12
                        }
                    }
                }],
                yAxis: [{
                    type: "value",
                    nameTextStyle: {
                        color: "rgb(124, 124, 124)",
                        fontSize: 12
                    },
                    axisLine: {
                        show: false
                    },
                    axisLabel: {
                        show: true,
                        textStyle: {
                            color: "rgb(124, 124, 124)",
                            fontSize: 12
                        }
                    }
                }],
                series: [{
                    name: "语文",
                    type: "line",
                    smooth: true,
                    itemStyle: {
                        normal: {
                            areaStyle: {
                                type: "default"
                            }
                        }
                    },
                    data: [80, 70, 77, 68, 90, 60, 80],
                    symbolSize: 0
                }, {
                    name: "数学",
                    type: "line",
                    smooth: true,
                    itemStyle: {
                        normal: {
                            areaStyle: {
                                type: "default"
                            }
                        }
                    },
                    data: [60, 80, 79, 88, 66, 70, 70],
                    symbolSize: 0
                }],
                color: ["rgb(113, 166, 239)", "rgb(104, 212, 177)", "rgb(84, 190, 204)", "rgb(164, 229, 155)", "rgb(230, 243, 164)"]
            };

            var dom = document.getElementById("demochart4");
            var myChart = echarts.init(dom);
            myChart.setOption(option, theme);
            $(window).resize(myChart.resize);
        }
    })(echarts);
});

//饼图
$(function() {
    (function(echarts) {
        if (document.getElementById("demochart5")) {
            var option = {
                tooltip: {
                    trigger: "item",
                    formatter: "{a} <br/>{b} : {c} ({d}%)"
                },
                legend: {
                    orient: "horizontal",
                    x: "center",
                    data: ["语文", "数学", "英语", "历史", "体育"],
                    y: "bottom",
                    itemGap: 10,
                    textStyle: {
                        color: "rgb(124, 124, 124)",
                        fontSize: 12
                    }
                },
                toolbox: {
                    show: false
                },
                calculable: false,
                series: [{
                    name: "第三单元小测",
                    type: "pie",
                    radius: ["45%", "75%"],
                    itemStyle: {
                        normal: {
                            labelLine: {
                                show: false
                            },
                            label: {
                                position: 'center',
                                textStyle: {
                                    color: '#7c7c7c',
                                    fontSize: '16'
                                },
                                formatter: function() {
                                    return "1000" + "\n" + "总数"
                                }
                            }
                        },
                        emphasis: {
                            label: {
                                show: false
                            }
                        }
                    },
                    data: [{
                        value: 80,
                        name: "语文"
                    }, {
                        value: 70,
                        name: "数学"
                    }, {
                        value: 60,
                        name: "英语"
                    }, {
                        value: 65,
                        name: "历史"
                    }, {
                        value: 90,
                        name: "体育"
                    }],
                    center: ["50%", "40%"]
                }],
                color: ["rgb(113, 166, 239)", "rgb(84, 190, 204)", "rgb(104, 212, 177)", "rgb(164, 229, 155)", "rgb(230, 243, 164)"]
            };

            var dom = document.getElementById("demochart5");
            var myChart = echarts.init(dom);
            myChart.setOption(option, theme);
            $(window).resize(myChart.resize);
        }
    })(echarts);
});

//环形图
$(function() {
    (function(echarts) {
        if (document.getElementById("demochart6")) {
            var labelTop = {
                normal: {
                    label: {
                        show: false,
                    },
                    labelLine: {
                        show: false
                    }
                }
            };
            var labelBottom = {
                normal: {
                    color: 'rgba(237,237,237,237)',
                    label: {
                        show: true,
                        position: 'center'
                    },
                    labelLine: {
                        show: false
                    }
                }
            };
            var labelFromatter = {
                normal: {
                    label: {
                        position: 'center',
                        textStyle: {
                            color: '#7c7c7c',
                            fontSize: '30'
                        },
                        formatter: function(params) {
                            return 100 - params.value + '%'
                        },

                    }
                },
            };
            var option = {
                tooltip: {
                    trigger: "item",
                    formatter: "{a} <br/>{b} : {c} ({d}%)"
                },
                legend: {
                    orient: "horizontal",
                    x: "center",
                    y: "bottom",
                    data: ["平均率"],
                    itemGap: 10,
                    textStyle: {
                        color: "rgb(124, 124, 124)",
                        fontSize: 12
                    }
                },
                toolbox: {
                    show: false
                },
                calculable: false,
                series: [{
                    name: "第三单元小测",
                    type: "pie",
                    radius: ["70%", "75%"],
                    itemStyle: labelFromatter,
                    data: [{
                        value: 80,
                        name: "平均率",
                        itemStyle: labelTop
                    }, {
                        value: 20,
                        name: "其他",
                        itemStyle: labelBottom
                    }],
                    center: ["50%", "40%"]
                }],
                color: ["rgb(113, 166, 239)"]
            };

            var dom = document.getElementById("demochart6");
            var myChart = echarts.init(dom);
            myChart.setOption(option, theme);
            $(window).resize(myChart.resize);
        }
    })(echarts);
});

//柱状图
$(function() {
    (function(echarts) {
        if (document.getElementById("demochart7")) {
            var option = {
                grid: {
                    x: 30,
                    y: 10,
                    x2: 10,
                    y2: 60,
                    borderWidth: 0
                },
                tooltip: {
                    trigger: "axis"
                },
                legend: {
                    data: ["语文", "数学"],
                    x: "center",
                    y: "bottom",
                    orient: "horizontal",
                    textStyle: {
                        color: "rgb(124, 124, 124)",
                        fontSize: 12
                    },
                    padding: 5,
                },
                toolbox: {
                    show: false,
                },
                calculable: true,
                xAxis: [{
                    type: "category",
                    data: ["2016/06", "2016/07", "2016/08", "2016/09", "2016/10", "2016/11", "2016/12"],
                    axisLine: {
                        show: false
                    },
                    axisLabel: {
                        textStyle: {
                            color: "rgb(124, 124, 124)",
                            fontSize: 12
                        },
                        show: true
                    },
                    axisTick: {
                        show: false
                    },
                    splitLine: {
                        show: false
                    }
                }],
                yAxis: [{
                    type: "value",
                    axisLine: {
                        show: false
                    },
                    axisLabel: {
                        textStyle: {
                            color: "rgb(124, 124, 124)",
                            fontSize: 12
                        }
                    }
                }],
                series: [{
                    name: "语文",
                    type: "bar",
                    data: [80, 77, 78, 68, 76, 88, 73]
                }, {
                    name: "数学",
                    type: "bar",
                    data: [70, 78, 85, 74, 83, 77, 81]
                }],
                color: ["rgb(113, 166, 239)", "rgb(104, 212, 177)", "rgb(84, 190, 204)", "rgb(164, 229, 155)", "rgb(230, 243, 164)"]
            };

            var dom = document.getElementById("demochart7");
            var myChart = echarts.init(dom);
            myChart.setOption(option, theme);
            $(window).resize(myChart.resize);
        }
    })(echarts);
});

//雷达图
$(function() {
    (function(echarts) {
        if (document.getElementById("demochart8")) {
            var option = {
                tooltip: {
                    trigger: "axis"
                },
                legend: {
                    orient: "horizontal",
                    x: "center",
                    data: ["上学期", "下学期"],
                    y: "bottom",
                    textStyle: {
                        fontSize: 12,
                        color: "rgb(124, 124, 124)"
                    }
                },
                toolbox: {
                    feature: {
                        mark: {
                            show: true
                        },
                        dataView: {
                            show: true,
                            readOnly: false
                        },
                        restore: {
                            show: true
                        },
                        saveAsImage: {
                            show: true
                        }
                    },
                    show: false
                },
                polar: [{
                    indicator: [{
                        text: "语文",
                        min: 0,
                        max: 100
                    }, {
                        text: "数学",
                        min: 0,
                        max: 100
                    }, {
                        text: "英语",
                        min: 0,
                        max: 100
                    }, {
                        text: "历史",
                        min: 0,
                        max: 100
                    }, {
                        text: "地理",
                        min: 0,
                        max: 100
                    }, {
                        text: "生物",
                        min: 0,
                        max: 100
                    }, {
                        text: "化学",
                        min: 0,
                        max: 100
                    }, {
                        axisLabel: {
                            textStyle: {
                                color: "rgb(124, 124, 124)",
                                fontSize: 12
                            }
                        }
                    }],
                    type: "polygon",
                    center: ["50%", "45%"],
                    radius: "65%"
                }],
                calculable: true,
                series: [{
                    type: "radar",
                    name: "",
                    data: [{
                        value: [70, 68, 70, 55, 40, 80, 90],
                        name: "上学期"
                    }],
                    symbolSize: 0,
                    itemStyle: {
                        normal: {
                            areaStyle: {
                                type: 'default'
                            }
                        }
                    }
                }, {
                    type: "radar",
                    name: "",
                    data: [{
                        value: [90, 90, 90, 60, 80, 50, 70],
                        name: "下学期"
                    }],
                    symbolSize: 0,
                    itemStyle: {
                        normal: {
                            areaStyle: {
                                type: 'default'
                            }
                        }
                    }
                }],
                color: ["rgb(113, 166, 239)", "rgb(104, 212, 177)", "rgb(84, 190, 204)", "rgb(164, 229, 155)", "rgb(230, 243, 164)"]
            };

            var dom = document.getElementById("demochart8");
            var myChart = echarts.init(dom);
            myChart.setOption(option, theme);
            $(window).resize(myChart.resize);
        }
    })(echarts);
});

//条形图
$(function() {
    (function(echarts) {
        if (document.getElementById("demochart9")) {
            var option = {
                tooltip: {
                    trigger: "axis"
                },
                legend: {
                    data: ["语文", "数学"],
                    x: "center",
                    y: "bottom",
                    orient: "horizontal",
                    textStyle: {
                        fontSize: 12,
                        color: "rgb(124, 124, 124)"
                    }
                },
                toolbox: {
                    show: false,
                    feature: {
                        mark: {
                            show: true
                        },
                        dataView: {
                            show: true,
                            readOnly: true
                        },
                        magicType: {
                            show: false,
                            type: ["line", "bar"]
                        },
                        restore: {
                            show: true
                        },
                        saveAsImage: {
                            show: true
                        }
                    }
                },
                calculable: true,
                xAxis: [{
                    type: "value",
                    boundaryGap: [0, 0.01],
                    axisLine: {
                        show: true,
                        lineStyle: {
                            color: "rgb(204, 204, 204)",
                            width: 1
                        }
                    },
                    axisLabel: {
                        textStyle: {
                            fontSize: 12,
                            color: "rgb(124, 124, 124)"
                        }
                    },
                    splitLine: {
                        show: false
                    }
                }],
                yAxis: [{
                    type: "category",
                    data: ["7月", "8月", "9月", "10月", "11月", "12月"],
                    axisLine: {
                        show: false
                    },
                    axisTick: {
                        show: false
                    },
                    axisLabel: {
                        textStyle: {
                            fontSize: 12,
                            color: "rgb(124, 124, 124)"
                        }
                    },
                    splitLine: {
                        show: false
                    }
                }],
                series: [{
                    name: "语文",
                    type: "bar",
                    data: [60, 65, 67, 70, 74, 78]
                }, {
                    name: "数学",
                    type: "bar",
                    data: [62, 68, 69, 72, 76, 80]
                }],
                color: ["rgb(113, 166, 239)", "rgb(104, 212, 177)", "rgb(84, 190, 204)", "rgb(164, 229, 155)", "rgb(230, 243, 164)"],
                grid: {
                    x: 40,
                    y: 10,
                    x2: 20,
                    y2: 60,
                    borderWidth: 0
                }
            };

            var dom = document.getElementById("demochart9");
            var myChart = echarts.init(dom);
            myChart.setOption(option, theme);
            $(window).resize(myChart.resize);
        }
    })(echarts);
});
